From 71d46bbbd8fb637b6bd00947c1303f0e8887d811 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 6 Oct 2016 22:34:47 +0200 Subject: APIDump: Fixed descriptions for cPluginManager:ForEachPlugin(). --- Server/Plugins/APIDump/Classes/Plugins.lua | 40 ++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/Server/Plugins/APIDump/Classes/Plugins.lua b/Server/Plugins/APIDump/Classes/Plugins.lua index ae9a06cba..c00735412 100644 --- a/Server/Plugins/APIDump/Classes/Plugins.lua +++ b/Server/Plugins/APIDump/Classes/Plugins.lua @@ -107,7 +107,8 @@ return Notes = "Sets the API version of the plugin. Currently unused.", }, }, - }, + }, -- cPlugin + cPluginLua = { Desc = "(OBSOLETE) This class is no longer useful in the API and will be removed as soon as all core plugins are migrated away from it. The {{cPlugin}} class serves as the main plugin instance's interface.", @@ -130,7 +131,8 @@ return }, }, Inherits = "cPlugin", - }, + }, -- cPluginLua + cPluginManager = { Desc = [[ @@ -439,21 +441,39 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); }, ForEachPlugin = { - IsStatic = true, - Params = { + IsStatic = true, + Params = { - Name = "CallbackFn", - Type = "function", + { + Name = "CallbackFn", + Type = "function", + }, + }, + Returns = + { + { + Type = "boolean", + }, }, + Notes = "Calls the CallbackFn function for each plugin that is currently discovered by Cuberite (including disabled, unloaded and errrored plugins). The CallbackFn has the following signature:
function ({{cPlugin|Plugin}})
If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true.", }, - Returns = { + Params = { - Type = "boolean", + { + Name = "CallbackFn", + Type = "function", + }, }, - }, - Notes = "Calls the CallbackFn function for each plugin that is currently discovered by Cuberite (including disabled, unloaded and errrored plugins). The CallbackFn has the following signature:
function ({{cPlugin|Plugin}})
If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true.", + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Calls the CallbackFn function for each plugin that is currently discovered by Cuberite (including disabled, unloaded and errrored plugins). The CallbackFn has the following signature:
function ({{cPlugin|Plugin}})
If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true.", + } }, Get = { -- cgit v1.2.3